package org.example.proxy.statics;

import org.example.proxy.vo.*;

/**
 * @author Administrator
 */
public class StaticProxyTestMain {

    public static void main(String[] args) {
        Person student = new Student("王同学");
        PersonProxy studentProxy = new PersonProxy(student);
        studentProxy.wakeup();
        studentProxy.sleep();

        Person doctor = new Doctor("张医生");
        PersonProxy doctorProxy = new PersonProxy(doctor);
        doctorProxy.wakeup();
        doctorProxy.sleep();

        Animal dog = new Dog("小黑狗");
        AnimalProxy dogProxy = new AnimalProxy(dog);
        dogProxy.wakeup();
        dogProxy.sleep();

        Animal cat = new Cat("小猫咪");
        AnimalProxy catProxy = new AnimalProxy(cat);
        catProxy.wakeup();
        catProxy.sleep();
    }
}
